<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.hrms.pojo.Department"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>部门信息列表</title>
<script type="text/javascript">
	function isDel() {
		return confirm("确定删除吗！")
	}
</script>
</head>
<body background="<%=path%>/images/background.jpg">
	<center>
		<jsp:include page="../top.jsp" flush="true"></jsp:include>
		<table width="800" height="48" border="0" cellpadding="0"
			cellspacing="0" background="<%=path%>/images/center1.jpg">
			<tr>
				<td valign="top">
					<table width="494">
						<tr>
							<td width="45" height="25"></td>
							<td width="437" valign="bottom"><a
								href="<%=path%>/admin/function"><b>主页</b></a>&gt;<a
								href="<%=path%>/depart/dep_f"><b>部门管理</b></a>&gt;<font
								color="#FF0000">部门信息列表</font></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>

		<table width="800" height="340" border="0" align="center"
			cellpadding="0" cellspacing="0"
			background="<%=path%>/images/center2.jpg">
			<tr>
				<td>
					<table width="700" border="1" align="center" cellpadding="0"
						cellspacing="0">
						<tr>
							<th class="style4"><div align="center">部门名称</div></th>
							<th class="style4"><div align="center">创建时间</div></th>
							<th class="style4"><div align="center">备注</div></th>
							<th class="style4"><div align="center">操作</div></th>
						</tr>
						<%
							Object obj = request.getAttribute("departList");
							List<Department> departList = (List<Department>) obj;
							for (Department dep : departList) {
						%>
						<tr>
							<td><%=dep.getDtName()%></td>
							<td><%=dep.getDtCreatetime()%></td>
							<td><%=dep.getDtBz()%></td>
							<td><a href="<%=path%>/depart/alter?dtId=<%=dep.getDtId()%>">修改</a>
								&nbsp; <a href="<%=path%>/depart/<%=dep.getDtId()%>/remove"
								onclick="return isDel()">删除</a>&nbsp; <a
								href="<%=path%>/depart/withemp?dtId=<%=dep.getDtId()%>">查看所属员工</a></td>
						</tr>
						<%
							}
						%>
					</table>
				</td>
			</tr>
		</table>
		<jsp:include page="../down.jsp" flush="true" />
	</center>
</body>
</html>